package com.naiterui.ehp.bs.emr.controller.inner;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.naiterui.ehp.bp.support.exception.PublicService;
import com.naiterui.ehp.bp.support.exception.ResponseVO;
import com.naiterui.ehp.bs.emr.service.ISuperviseService;
import com.naiterui.ehp.bs.emr.vo.SuperviseFirstToDoctorVO;
import com.naiterui.ehp.bs.emr.vo.SuperviseMedicalRecordVO;

import lombok.extern.slf4j.Slf4j;

/**
 * <pre>
 *
 * </pre>
 *
 * @author fangguanhong
 * @date 2021/1/15 上午11:40
 * @since 1.0.0
 */
@Slf4j
@RestController
@RequestMapping("emr/inner/supervise/record")
public class EmrInnerSuperviseController {

    @Autowired
    private ISuperviseService superviseService;

    /**
     * 获取一个会话涉及的病历信息
     *
     * @param sessionId
     * @param patientId
     * @param doctorId
     *
     * @return
     */
    @GetMapping("get")
    public ResponseVO<List<SuperviseMedicalRecordVO>> medicalRecord(String sessionId, Long patientId, Long doctorId) {
        return PublicService.returnResponseVO(superviseService.medicalRecord(sessionId, patientId, doctorId));
    }

    @GetMapping("firsttodoctor/info")
    public ResponseVO<SuperviseFirstToDoctorVO> firstToDoctor(Long patientId) {
        return PublicService.returnResponseVO(superviseService.firstToDoctor(patientId));
    }
}
